package com.greyu.ysj.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class CbtInvest implements Serializable {
    private Integer id;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 币ID
     */
    private Integer coinId;

    /**
     * 投资时间
     */
    private Date investDate;

    /**
     * 投资数额
     */
    private Double investAmount;

    /**
     * 投资天数
     */
    private Integer investDuration;

    /**
     * 是否冻结
     */
    private String freezeFlag;

    private Integer extractFlag;

    private Integer ratio;
    
    private Double ethPrice;

    private Double price;

    private Double dfcPrice;
    /**
     * 
     */
    private CbtIncome cbtIncome;
    
    private CbtCoininfo cbtCoininfo;
    
    private CbtTransfer cbtTransfer;
    
  
    
    public CbtIncome getCbtIncome() {
		return cbtIncome;
	}

	public void setCbtIncome(CbtIncome cbtIncome) {
		this.cbtIncome = cbtIncome;
	}

	public CbtCoininfo getCbtCoininfo() {
		return cbtCoininfo;
	}

	public void setCbtCoininfo(CbtCoininfo cbtCoininfo) {
		this.cbtCoininfo = cbtCoininfo;
	}

	public CbtTransfer getCbtTransfer() {
		return cbtTransfer;
	}

	public void setCbtTransfer(CbtTransfer cbtTransfer) {
		this.cbtTransfer = cbtTransfer;
	}

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCoinId() {
        return coinId;
    }

    public void setCoinId(Integer coinId) {
        this.coinId = coinId;
    }

    public Date getInvestDate() {
        return investDate;
    }

    public void setInvestDate(Date investDate) {
        this.investDate = investDate;
    }

    public Double getInvestAmount() {
        return investAmount;
    }

    public void setInvestAmount(Double investAmount) {
        this.investAmount = investAmount;
    }

    public Integer getInvestDuration() {
        return investDuration;
    }

    public void setInvestDuration(Integer investDuration) {
        this.investDuration = investDuration;
    }

    public String getFreezeFlag() {
        return freezeFlag;
    }

    public void setFreezeFlag(String freezeFlag) {
        this.freezeFlag = freezeFlag;
    }

    public Integer getExtractFlag() {
        return extractFlag;
    }

    public void setExtractFlag(Integer extractFlag) {
        this.extractFlag = extractFlag;
    }

    public Integer getRatio() {
        return ratio;
    }

    public void setRatio(Integer ratio) {
        this.ratio = ratio;
    }
    public Double getEthPrice() {
        return ethPrice;
    }

    public void setEthPrice(Double ethPrice) {
        this.ethPrice = ethPrice;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }
    
    public Double getDfcPrice() {
        return dfcPrice;
    }

    public void setDfcPrice(Double dfcPrice) {
        this.dfcPrice = dfcPrice;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CbtInvest other = (CbtInvest) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCoinId() == null ? other.getCoinId() == null : this.getCoinId().equals(other.getCoinId()))
            && (this.getInvestDate() == null ? other.getInvestDate() == null : this.getInvestDate().equals(other.getInvestDate()))
            && (this.getInvestAmount() == null ? other.getInvestAmount() == null : this.getInvestAmount().equals(other.getInvestAmount()))
            && (this.getInvestDuration() == null ? other.getInvestDuration() == null : this.getInvestDuration().equals(other.getInvestDuration()))
            && (this.getFreezeFlag() == null ? other.getFreezeFlag() == null : this.getFreezeFlag().equals(other.getFreezeFlag()))
            && (this.getExtractFlag() == null ? other.getExtractFlag() == null : this.getExtractFlag().equals(other.getExtractFlag()))
            && (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio()))
            && (this.getEthPrice() == null ? other.getEthPrice() == null : this.getEthPrice().equals(other.getEthPrice()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getDfcPrice() == null ? other.getDfcPrice() == null : this.getDfcPrice().equals(other.getDfcPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCoinId() == null) ? 0 : getCoinId().hashCode());
        result = prime * result + ((getInvestDate() == null) ? 0 : getInvestDate().hashCode());
        result = prime * result + ((getInvestAmount() == null) ? 0 : getInvestAmount().hashCode());
        result = prime * result + ((getInvestDuration() == null) ? 0 : getInvestDuration().hashCode());
        result = prime * result + ((getFreezeFlag() == null) ? 0 : getFreezeFlag().hashCode());
        result = prime * result + ((getExtractFlag() == null) ? 0 : getExtractFlag().hashCode());
        result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode());
        result = prime * result + ((getEthPrice() == null) ? 0 : getEthPrice().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getDfcPrice() == null) ? 0 : getDfcPrice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", coinId=").append(coinId);
        sb.append(", investDate=").append(investDate);
        sb.append(", investAmount=").append(investAmount);
        sb.append(", investDuration=").append(investDuration);
        sb.append(", freezeFlag=").append(freezeFlag);
        sb.append(", extractFlag=").append(extractFlag);
        sb.append(", ratio=").append(ratio);
        sb.append(", ethPrice=").append(ethPrice);
        sb.append(", price=").append(price);
        sb.append(", dfcPrice=").append(dfcPrice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}